# 去除字母
def letters(n):
    a = "qwertyuiopasdfghjklzxcvbnm"
    m = n.lower()
    for i in m:
        if i in a:
            m = m.replace(i,"")
    return m

# 字符串反转
def reverse(n):
    n = n[::-1]
    return n

def main():
    n = input("请输入字符串：")
    n = letters(n)
    n = reverse(n)
    print(n)

main()